<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>animation-timing-function</title>
<meta name="description" content="CSS3 animation-timing-function属性用于检索或设置对象动画的过渡类型" />
<meta name="keywords" content="animation-timing-function, css3, css3参考手册" />
<meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" />
<meta name="robots" content="all" />
<!--[if lte IE 8]>
<script src="../../js/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="../../skin/article.css" />
</head>
<body>
<nav id="guide" class="g-mod">
	<div class="from">
		<a href="http://css.doyoe.com/" target="_blank">CSS3参考手册</a>
		<span>&#187;</span>
		<a href="../index.htm">属性列表</a>
		<span>&#187;</span>
		<a href="index.htm" id="category" rel="properties/animation" name="animation-timing-function">动画属性</a>
		<span>&#187;</span>
	</div>
	<div class="to">
		<span class="label">相关内容：</span>
		<div class="g-combobox g-transition">
			<a href="?" class="g-transition target">
				<strong>其它动画属性参考</strong>
				<span>选择其它项<!--[if lte IE 7]><ins>IE7 and earlier, Get to die</ins><![endif]--></span>
			</a>
			<div class="g-transition list">
				<ul>
					<!-- 插入快速分类导航 -->
				</ul>
			</div>
		</div>
	</div>
</nav>
<header id="hd">
	<section id="title" class="g-mod">
		<h1 class="tit">animation-timing-function</h1>
		<ul class="info">
			<li><strong>版本：CSS3</strong></li>
			<li>2015.8.13</li>
		</ul>
		<!-- 插入浏览器信息 -->
	</section>
</header>
<section id="bd">
	<section id="syntax" class="g-mod g-attr">
		<h2 class="tit">语法：</h2>
		<div class="cont">
			<p><strong>animation-timing-function</strong>：<a href="#single-animation-timing-function">&lt;single-animation-timing-function&gt;</a>[,<a href="#single-animation-timing-function">&lt;single-animation-timing-function&gt;</a>]*</p>
			<p id="single-animation-timing-function"><strong>&lt;single-animation-timing-function&gt;</strong> = ease | linear | ease-in | ease-out | ease-in-out | step-start | step-end | steps(<a href="../../values/numeric/integer.htm">&lt;integer&gt;</a>[, [ start | end ] ]?) | cubic-bezier(<a href="../../values/numeric/number.htm">&lt;number&gt;</a>, <a href="../../values/numeric/number.htm">&lt;number&gt;</a>, <a href="../../values/numeric/number.htm">&lt;number&gt;</a>, <a href="../../values/numeric/number.htm">&lt;number&gt;</a>)</p>
			<p><strong>默认值</strong>：<mark class="defaultvalue">ease</mark></p>
			<p><strong>适用于</strong>：所有元素，包含伪对象:after和:before</p>
			<p><strong>继承性</strong>：无</p>
			<p><strong>动画性</strong>：否</p>
			<p><strong>计算值</strong>：指定值</p>
			<p><strong>媒体</strong>：视觉</p>
		</div>
	</section>
	<section id="value" class="g-mod g-attr">
		<h2 class="tit">取值：</h2>
		<div class="cont">
			<dl>
				<dt>linear：</dt>
				<dd>线性过渡。等同于贝塞尔曲线(0.0, 0.0, 1.0, 1.0)</dd>
				<dt>ease：</dt>
				<dd>平滑过渡。等同于贝塞尔曲线(0.25, 0.1, 0.25, 1.0)</dd>
				<dt>ease-in：</dt>
				<dd>由慢到快。等同于贝塞尔曲线(0.42, 0, 1.0, 1.0)</dd>
				<dt>ease-out：</dt>
				<dd>由快到慢。等同于贝塞尔曲线(0, 0, 0.58, 1.0)</dd>
				<dt>ease-in-out：</dt>
				<dd>由慢到快再到慢。等同于贝塞尔曲线(0.42, 0, 0.58, 1.0)</dd>
				<dt>step-start：</dt>
				<dd>等同于 steps(1, start)</dd>
				<dt>step-end：</dt>
				<dd>等同于 steps(1, end)</dd>
				<dt>steps(&lt;integer&gt;[, [ start | end ] ]?)：</dt>
				<dd>接受两个参数的步进函数。第一个参数必须为正整数，指定函数的步数。第二个参数取值可以是start或end，指定每一步的值发生变化的时间点。第二个参数是可选的，默认值为end。</dd>
				<dt>cubic-bezier(&lt;number&gt;, &lt;number&gt;, &lt;number&gt;, &lt;number&gt;)：</dt>
				<dd>特定的贝塞尔曲线类型，4个数值需在[0, 1]区间内</dd>
			</dl>
		</div>
	</section>
	<section id="intro" class="g-mod g-attr">
		<h2 class="tit">说明：</h2>
		<div class="cont">
			<strong>检索或设置对象动画的过渡类型</strong>
			<ul>
				<li>如果提供多个属性值，以逗号进行分隔。</li>
				<li>对应的脚本特性为<strong>animationTimingFunction</strong>。</li>
			</ul>
		</div>
	</section>
	<section id="compatible" class="g-mod g-attr">
		<h2 class="tit">兼容性：</h2>
		<div class="cont">
			<ul class="support-type">
				<li><span class="support">浅绿</span> = 支持</li>
				<li><span class="unsupport">红色</span> = 不支持</li>
				<li><span class="partsupport">粉色</span> = 部分支持</li>
			</ul>
			<table class="g-data">
                <thead>
                    <tr>
                        <th>Values</th>
                        <th>IE</th>
                        <th>Firefox</th>
                        <th>Chrome</th>
                        <th>Safari</th>
                        <th>Opera</th>
                        <th>iOS Safari</th>
                        <th>Android Browser</th>
                        <th>Android Chrome</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td rowspan="3"><strong>Basic Support</strong></td>
                        <td class="unsupport">6.0-9.0</td>
                        <td class="unsupport">2.0-4.0</td>
                        <td class="support">4.0-42.0<sup class="fix">-webkit-</sup></td>
                        <td class="support">6.0-8.0<sup class="fix">-webkit-</sup></td>
                        <td class="support">15.0-29.0<sup class="fix">-webkit-</sup></td>
                        <td class="support">6.0-8.4<sup class="fix">-webkit-</sup></td>
                        <td class="partsupport">2.1-3.0<sup class="fix">-webkit-</sup> <sup><a href="#support1">#1</a></sup></td>
                        <td class="support" rowspan="3">18.0-42.0<sup class="fix">-webkit-</sup></td>
                    </tr>
                    <tr>
                        <td class="support" rowspan="2">10.0+</td>
                        <td class="support">5.0-15.0<sup class="fix">-moz-</sup></td>
                        <td class="support" rowspan="2">43.0+</td>
                        <td class="support" rowspan="2">9.0+</td>
                        <td class="support" rowspan="2">30.0+</td>
                        <td class="support" rowspan="2">9.0+</td>
                        <td class="support" rowspan="2">4.0-40.0<sup class="fix">-webkit-</sup></td>
                    </tr>
                    <tr>
                        <td class="support">16.0+</td>
                    </tr>
                </tbody>
            </table>
            <ol class="support-info">
                <li id="support1">在一些场景中会有错误行为</li>
                <li id="support2">部分浏览器不支持伪元素动画，或者支持得不够好，尽可能不要利用伪元素来做动画</li>
            </ol>
		</div>
	</section>
	<section id="example" class="g-mod g-attr">
		<h2 class="tit">示例：</h2>
		<div class="cont">
			<textarea cols="90" rows="10">
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>animation-timing-function_CSS参考手册_web前端开发参考手册系列</title>
<meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" />
<style>
h1{font-size:16px;}
div{width:60px;height:60px;margin:200px 0 0 50px;padding:10px;border-radius:41px;box-shadow:0 0 10px rgba(204,102,0,.8);background:#F6D66E;background:-moz-linear-gradient(top,#fff,#F6D66E);background:-webkit-linear-gradient(top,#fff,#F6D66E);background:linear-gradient(to bottom,#fff,#F6D66E);
    -moz-animation:animations 4s linear infinite;
    -webkit-animation:animations 4s linear infinite;
    animation:animations 4s linear infinite;
}
@-webkit-keyframes animations{
    0%{-webkit-transform:translate(0,0);}
    12%{-webkit-transform:translate(80px,-25px);}
    25%{-webkit-transform:translate(200px,-50px);}
    38%{-webkit-transform:translate(320px,-25px);}
    50%{-webkit-transform:translate(400px,0);}
    62%{-webkit-transform:translate(320px,25px);}
    75%{-webkit-transform:translate(200px,50px);}
    87%{-webkit-transform:translate(80px,25px);}
    100%{-webkit-transform:translate(0,0);}
}
@-moz-keyframes animations{
    0%{-moz-transform:translate(0,0);}
    12%{-moz-transform:translate(80px,-25px);}
    25%{-moz-transform:translate(200px,-50px);}
    38%{-moz-transform:translate(320px,-25px);}
    50%{-moz-transform:translate(400px,0);}
    62%{-moz-transform:translate(320px,25px);}
    75%{-moz-transform:translate(200px,50px);}
    87%{-moz-transform:translate(80px,25px);}
    100%{-moz-transform:translate(0,0);}
}
@keyframes animations{
    0%{transform:translate(0,0);}
    12%{transform:translate(80px,-25px);}
    25%{transform:translate(200px,-50px);}
    38%{transform:translate(320px,-25px);}
    50%{transform:translate(400px,0);}
    62%{transform:translate(320px,25px);}
    75%{transform:translate(200px,50px);}
    87%{transform:translate(80px,25px);}
    100%{transform:translate(0,0);}
}
</style>
</head>
<body>
<h1>线性运动的太阳（您还可以定义其它的动画过渡类型，如ease-in,ease-out等）：</h1>
<div></div>
<p></p>
</body>
</html>
			</textarea>
			<p><input type="button" value="运行" class="g-btn g-btn-sure" /></p>
		</div>
	</section>
</section>
<footer id="ft">
	<aside id="rights" class="g-mod">
		<!-- 插入浏览器及版权信息 -->
	</aside>
</footer>
<script src="../../js/jquery.js"></script>
<script src="../../js/inner.js"></script>
</body>
</html>